package test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * 司机类中有一个方法 work
 */
@Component
public class Driver {
    @Autowired
    @Qualifier("stone")
    private  Car car;
    public void work() {
        car.drive();
                System.out.println("司机出去工作了");
    }
}
